<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
		<title></title>
	</head>
	<body>
		
		<div id="emit-example-simple">
		  <welcome-button v-on:welcome="SayHi()"></welcome-button>
		</div>
		
		
	<script type="text/javascript">
		Vue.component('welcome-button', {
		  template: `
		    <button v-on:click="$emit('welcome')">
		      Click me to be welcomed
		    </button>
		  `
		})
		
	var vm = new Vue({
		  el: '#emit-example-simple',
		  data:{
			  count:0
		  },
		  methods:{
			  SayHi:function(){
				  alert('Hi');
			  }
		  }
		})
	</script>
		
	</body>
</html>
